<?php $this->load->view('wap/head.php'); ?>
<!-- 模拟变量 -->
<input type="hidden" name="title" id="title" value="<?php echo $view['title']; ?>" />

<!-- owl.carousel-->
<link rel="stylesheet" href="<?php echo base_url(); ?>default/wap/css/owl.carousel.css">
<link rel="stylesheet" href="<?php echo base_url(); ?>default/wap/css/owl.theme.css">
<script src="<?php echo base_url(); ?>default/wap/js/owl.carousel.min.js"></script>

<script src="<?php echo base_url(); ?>default/wap/js/page.js"></script>

    <style type="text/css">
        body{background-color:#f0f0e1;}
        #guide{ width: 100%; background-color:rgba(0,0,0,.5);height:100%; position:absolute; top:0; right:0; }
        img{ display: block; float: right; margin-right: 4%;}
        .img_left{ display: block; margin: auto; margin-top: 20%;}
        .img_right{ display: block; margin-left: 70%; margin-top: -40%;}
        #guide_content{ text-align: center; margin-top: 10%; color: #ffffff; font-size: 18px;}
    </style>

<div class="pages center-block pages-down">

  <div class="hd-page"> <a href="<?php echo site_url('wap/index/index/?type=2')?>"><i class="icon-jt"></i></a>
    <img class="hd-page-logo" src="<?php echo base_url(); ?>default/wap/img/logo.png"></div>

  <div class="bd-page">
    <div class="owl-carousel owl-page-down">
      <div>
        <ul>
            <?php foreach($view_img as $key=>$val){ if($key<3){ ?>
          <li>
              <img class="thumb" src="<?php echo base_url().$val['picture']; ?>">
          </li>
            <?php } } ?>
        </ul>
      </div>
        <?php if(count($view_img)>3 && count($view_img)<=6){ ?>
        <div>
            <ul>
                <?php foreach($view_img as $key=>$val){ if($key>=3 && $key<6){ ?>
                    <li>
                        <img class="thumb" src="<?php echo base_url().$val['picture']; ?>">
                    </li>
                <?php } } ?>
            </ul>
        </div>
        <?php } ?>
        <?php if(count($view_img)>6 && count($view_img)<=9){ ?>
        <div>
            <ul>
                <?php foreach($view_img as $key=>$val){ if($key>=6 && $key<9){ ?>
                    <li>
                        <img class="thumb" src="<?php echo base_url().$val['picture']; ?>">
                    </li>
                <?php } } ?>
            </ul>
        </div>
        <?php } ?>
    </div>

    <div class="tp-page-down">
      <img class="thumb" src="<?php  if(!empty($view['picture'])){echo base_url().$view['picture'];}else{ echo base_url().'default/wap/img/g2.jpg';} ?>" />
      <div class="info">
        <div class="info-right">

          <p>
            <a href="javascript:guide(<?php echo $guide; ?>,<?php echo $phone; ?>,'<?php echo $view['url']; ?>')" class="btn btn-down">立即下载</a>
          </p>
        </div>

        <div class="info-left">
          <p class="hd"><?php echo $view['title']; ?></p>
          <p class="tag-name">
              <?php echo $view['category_title']; ?>
          </p>
          <p class="tag-name">
            <?php echo $view['size']; ?>M
          </p>
        </div>
      </div>

    </div>

    <div class="icon-bar"> <i class="icon-link icon-link-l"></i>
      <i class="icon-link icon-link-r"></i>
    </div>
    <!--
    <div class="lb-page">
       我叫MT (春节礼包) <a href="#" class="btn btn-lb">领取</a>
    </div>

    <div class="lb-page">
       我叫MT (春节礼包) <a href="#" class="btn btn-lb">领取</a>
    </div>
    -->
    <div class="icon-bar"> <i class="icon-link icon-link-l"></i>
      <i class="icon-link icon-link-r"></i>
    </div>

    <div class="md-page">

      <p class="hd">简介</p>
      <p class="desc"><?php echo $view['description']; ?></p>

    </div>

  </div>

  <div class="fd-page">
    <div class="owl-carousel owl-page">
      <div>
        <ul>
            <?php foreach($array_category as $key=>$val){ ?>
                <li>
                    <a href="<?php echo site_url('wap/index/recommend_view/'.$val['id'])?>">
                        <img class="thumb" src="<?php if($val['picture']){echo base_url().$val['picture'];}else{echo base_url().'default/wap/img/g2.jpg';} ?>">
                        <p><?php echo $val['title']; ?></p>
                    </a>
                </li>
            <?php } ?>
        </ul>
      </div>
    </div>
  </div>
    <div onclick="remove_guide()" id="guide" style="display: none" >
        <!--
        <div id="guide_head">
            <img class="img_left" src="<?php echo base_url(); ?>default/wap/img/guide1.png" />
            <img class="img_right" src="<?php echo base_url(); ?>default/wap/img/guide2.png" />
        </div>
        <div id="guide_content">点击从浏览器打开</div>
        -->
        <img  src="<?php echo base_url(); ?>default/wap/img/guide.png" />

    </div>
<script>
    function guide(type,phone,url){
        if(type==1 && phone==2){
            document.getElementById('guide').style.display="block";
        }else{
            window.location.href=url;
        }
    }
    function remove_guide(){
        document.getElementById('guide').style.display="none";
    }
</script>
<?php $this->load->view('wap/foot.php'); ?>